package com.gdwhomework.chapter07.homework003;

public class Manager extends Worker{
    private double grade = 1.2;
    private double bonus;

    public double getGrade() {
        return grade;
    }

    public void setGrade(double grade) {
        this.grade = grade;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    public Manager(String name, double day_sal, int work_day, double grade, double bonus) {
        super(name, day_sal, work_day);
        this.grade = grade;
        this.bonus = bonus;
    }

    @Override
    public void show_month_sal() {
        System.out.println("部门经理"+getName()+"的工资为："+get_month_sal());
    }

    @Override
    public double get_month_sal() {
        return super.get_month_sal()*getGrade()+getBonus();
    }
}
